﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OpenSda.Agilcont.Common.Business.Exceptions
{
    public sealed class FilterCannotBeNullOrEmptyException : Exception
    {
        public FilterCannotBeNullOrEmptyException()
            : base("Filter cannot be null or empty")
        {
        }
    }

    public sealed class IdentifierCannotBeNullOrEmptyException : Exception
    {
        public IdentifierCannotBeNullOrEmptyException()
            : base("Identifier cannot be null or empty")
        {
        }
    }

    public sealed class CodeCannotBeNullOrEmptyException : Exception
    {
        public CodeCannotBeNullOrEmptyException()
            : base("Code cannot be null or empty")
        {
        }
    }

    //public sealed class UserNameCannotBeNullException : Exception
    //{
    //    public UserNameCannotBeNullException()
    //        : base("User name can not be null")
    //    {
    //    }
    //}

    //public sealed class UserCannotBeNullException : Exception
    //{
    //    public UserCannotBeNullException()
    //        : base("User can not be null")
    //    {
    //    }
    //}

    public sealed class DataCannotBeNullException : Exception
    {
        public DataCannotBeNullException()
            : base("Data can not be null")
        {
        }
    }

    public sealed class NameCannotBeNullException : Exception
    {
        public NameCannotBeNullException()
            : base("Name can not be null")
        {
        }
    }

    public sealed class ObjectCannotBeNullException : Exception
    {
        public ObjectCannotBeNullException()
            : base("Object cannot be null")
        {
        }
    }

    public sealed class WrongValueException : Exception
    {
        public WrongValueException()
            : base("Wrong value")
        {
        }
    }

    public sealed class RangeIsInvalidException : Exception
    {
        public RangeIsInvalidException()
            : base("The range you entered is invalid")
        {
        }
    }

    public sealed class ObjectHasDependentException : Exception
    {
        public ObjectHasDependentException()
            : base("Already has dependents")
        {
        }
    }

    public sealed class ThereIsNoDataToView : Exception
    {
        public ThereIsNoDataToView()
            : base("There is no data to view")
        {
        }
    }

    public sealed class ListIsEmptyException : Exception
    {
        public ListIsEmptyException()
            : base("The List is empty")
        {
        }
    }

    public sealed class ListCannotBeNullException : Exception
    {
        public ListCannotBeNullException()
            : base("The List cannot be null")
        {
        }
    }

    public sealed class ObjectNotExistsException : Exception
    {
        public ObjectNotExistsException()
            : base("Record already not exists")
        {
        }
    }

    public sealed class UserHasNotPermissionException : Exception
    {
        public UserHasNotPermissionException()
            : base("The user has not permission")
        {
        }
    }
 
    public sealed class PriorityCanNotBeChangedException : Exception
    {
        public PriorityCanNotBeChangedException()
            : base("Priority can not be changed")
        {
        }
    }

    public sealed class NameAlreadyExistsException : Exception
    {
        public NameAlreadyExistsException()
            : base("Name already exists")
        {
        }
    }

    public sealed class FinalDateCannotBeEarlierThanInitialDateException : Exception
    {
        public FinalDateCannotBeEarlierThanInitialDateException()
            : base("Final date can not be earlier of initial date")
        { 
        }
    }

}
